package com.example.user.web;

import com.example.user.pojo.User;
import com.example.user.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 用户服务
 */
@RestController
@RequestMapping("/users")
@Slf4j
public class UserController {
	@Autowired
	private UserService userService;

	/**
	 * 获取用户细信息
	 * @param id 标识
	 * @return
	 */
	@RequestMapping("/query/{id}")
	public User queryById(@PathVariable("id") String id){
		return userService.queryById(id);
	}
}
